<script setup>

import VueEcharts from "vue-echarts";

const props = defineProps({
  data: { type: Array, default: () => [] },
})

const options = computed(() => {

  const data = props.data;

  return {
    tooltip: { trigger: 'item', axisPointer: { type: 'shadow' } },
    legend: {
      bottom: 10,
      left: 'center',
    },
    series: [{
      name: '资产状态分布',
      type: 'pie',
      radius: '50%',
      data: data,
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }]
  }
})

</script>

<template>
  <VueEcharts :option="options" style="height: 400px"></VueEcharts>
</template>

<style scoped lang="scss">

</style>